﻿namespace WFBot.Data
{
    using System;
    using System.Diagnostics.Contracts;

    [ContractClass(typeof(IDatabaseFactoryContract))]
    public interface IDatabaseFactory : IDisposable
    {
         Database Get();
    }

    [ContractClassFor(typeof(IDatabaseFactory))]
    sealed class IDatabaseFactoryContract : IDatabaseFactory
    {
        Database IDatabaseFactory.Get()
        {
            Contract.Ensures(Contract.Result<Database>() != null);
            return default(Database);
        }
        
        void IDisposable.Dispose()
        {
        }
    }
}
